import java.util.Scanner;
public class Player {
    private int levelNo;
    private int curScore;
    private long startTime=0;
    private int elapseTime;

    public int getLevelNo() {
        return levelNo;
    }
    public void setLevelNo(int levelNo){
        this.levelNo=levelNo;
    }

    public int getCurrScore(){
        return curScore;
    }
    public void setCurrScore(int currScore){
        this.curScore=currScore;
    }

    public long getStartTime() {
        return startTime;
    }
    public void setStartTime(long startTime) {
        this.startTime = startTime;
    }

    public int getElapseTime(){
        return elapseTime;
    }
    public void setElapseTime(int elapseTime) {
        this.elapseTime = elapseTime;
    }

    public Player(int levelNo,int currScore,long startTime,int elapseTime){
        super();
        this.levelNo=levelNo;
        this.curScore=currScore;
        this.startTime=startTime;
        this.elapseTime=elapseTime;
    }
    public Player(){
        super();
    }

    public void play(){
        Game game=new Game(this);
        Scanner scanner=new Scanner(System.in);

        for(int i = 0; i<LevelParam.levels.length; i++){
            levelNo +=1;
            startTime=System.currentTimeMillis();
            curScore=0;
            for(int j=0;j<LevelParam.levels[i].getStrTime();j++){
                String out=game.printStr();
                String in=scanner.next();
                game.printResult(out,in);
            }
        }
    }
}
